package com.fengniao.goods.dao;

import com.fengniao.goods.pojo.Brand;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;


/**
 * @author lanhai
 * @date 2021/7/4 18:30
 */
@RegisterMapper
@Component
public interface BrandMapper extends Mapper<Brand> {

    @Select("select tb.* from tb_category_brand tcb, tb_brand tb where tcb.brand_id = tb.id and tcb.category_id = #{categoryId}")
    List<Brand> selectBrandByCategoryId(Integer categoryId);
}
